package com.yh.services.impl;

import com.yh.dao.IBookMapper;
import com.yh.entity.Books;
import com.yh.services.IBookService;
import com.yh.util.SqlSessionFactaryUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class BookServiceImpl implements IBookService {
    SqlSession session=SqlSessionFactaryUtil.getSession();
    IBookMapper mapper = session.getMapper(IBookMapper.class);
    @Override
    public List<Books> showAllByBname(String name) {
        return mapper.showAllByBname(name);
    }

    @Override
    public List<Books> showAllByAuthor(String author) {
        return mapper.showAllByAuthor(author);
    }

    @Override
    public List<Books> showAllByPubl(String publ) {
        return mapper.showAllByPubl(publ);
    }
}
